import torch
import torch.nn as nn
import torch.nn.functional as F



class my_model(nn.Module):
    def __init__(self, dims):
        super(my_model, self).__init__()
        self.layers1 = nn.Linear(dims[0], dims[1])
        self.semantic_weight = nn.Parameter(torch.tensor(0.1))  #权重参数
        self.hardness_weight = nn.Parameter(torch.tensor(0.1))  #难度参数
    def forward(self, x):
        out1 = self.layers1(x)
        out1 = F.normalize(out1, dim=1, p=2)
        return out1
